angular.module('liemallfodder')
    .service('Toast', function (toaster) {
        this.isShown = false;
        var self = this;

        this.show = function (message) {
            if (!self.isShown) {
                self.isShown = true;
                toaster.pop({
                    type: 'info',
                    body: message,
                    onHideCallback: function () {
                        self.isShown = false;
                    }
                });
            }
        }
    });
